<?php

function __autoload($class)
{
	$class = $class . '.class.php';
	
	if(file_exists($class))
		require_once($class);
	elseif(file_exists('lib/'.$class))
		require_once('lib/'.$class);
	elseif(file_exists('../lib/'.$class))
		require_once('../lib/'.$class);
	elseif(file_exists('../../lib/'.$class))
		require_once('../../lib/'.$class);
	elseif(file_exists('../lib/'.$class))
		require_once('./lib/'.$class);
	else
		throw new Exception('Class inclusion failure');
}

function formatDate($format,$date)
{
	date_default_timezone_set("Europe/Paris"); 
	return date($format, strtotime($date));
}

?>